-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing 2 bugs related to failure scenarios #599
Fixing 2 bugs related to failure scenarios #599
Conversation
✅ Deploy Preview for kubernetes-sigs-kmm ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yevgeny-shnaidman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
First bug: If during module deletion scenario, UnloadKmod function returns and error for some reason, the GarbageCollectInUseLabels and UpdateNodeLabelsAndRecordEvents onw't be called. This in turn means, that if there is a module that was being loaded/unloaded in parallel, the actual action will happen (load/unload from kernel), but the label in NMC and node won't be updated. Solution: always continue with GarbageCollectInUseLabels and UpdateNodeLabelsAndRecordEvents and return a collective error later Second bug: In case ProcessModuleSpec from some spec/status has failed, the status would not be deleted from the statusMap, which will cause it later to be treated as orphaned status and the UnloadKmod to be called. Solution: always delete status from statusMap, even in case of a failure
f0f93c3
to
e2b637c
Compare
/lgtm |
…ernetes-sigs#822) First bug: If during module deletion scenario, UnloadKmod function returns and error for some reason, the GarbageCollectInUseLabels and UpdateNodeLabelsAndRecordEvents onw't be called. This in turn means, that if there is a module that was being loaded/unloaded in parallel, the actual action will happen (load/unload from kernel), but the label in NMC and node won't be updated. Solution: always continue with GarbageCollectInUseLabels and UpdateNodeLabelsAndRecordEvents and return a collective error later Second bug: In case ProcessModuleSpec from some spec/status has failed, the status would not be deleted from the statusMap, which will cause it later to be treated as orphaned status and the UnloadKmod to be called. Solution: always delete status from statusMap, even in case of a failure
First bug:
If during module deletion scenario, UnloadKmod function returns and error for some reason, the GarbageCollectInUseLabels and UpdateNodeLabelsAndRecordEvents onw't be called. This in turn means, that if there is a module that was being loaded/unloaded in parallel, the actual action will happen (load/unload from kernel), but the label in NMC and node won't be updated.
Solution: always continue with GarbageCollectInUseLabels and UpdateNodeLabelsAndRecordEvents and return a collective error later
Second bug:
In case ProcessModuleSpec from some spec/status has failed, the status would not be deleted from the statusMap, which will cause it later to be treated as orphaned status and the UnloadKmod to be called. Solution: always delete status from statusMap, even in case of a failure